import "babel-polyfill";

export default class Stack {
    data = [];

    constructor() {
        this.push(...arguments);
    }

    get [Symbol.toStringTag]() {
        return "Stack";
    }

    get length() {
        return this.data.length;
    }

    push() {
        return this.data.push(...arguments);
    }
    pop() {
        return this.data.pop();
    }
    top() {
        return this.data[this.data.length - 1];
    }
};
